export const joinQuery = function (url, query) {
  return Object.keys(query).reduce((p, key, i) => {
    const f = i ? '&' : '?'
    p += f + `${key}=${query[key]}`
    return p
  }, url)
}
